function [CDELM_Weight, CDELM_bias] = generate_CDELM_Weight(data_train,random_indices ,rand_label, CDELM_threshold,Deactivation_ratio)
    CDELM_Weight = [];
    CDELM_bias = [];
    
    CDELM_list = find_different_pairs(rand_label);

    % 获取 data_train 的列数
    [~, num_cols] = size(data_train);
    if num_cols > 900
        % 计算要置零的列数
        num_cols_to_zero = round(Deactivation_ratio * num_cols);
        % 生成一个长度为 num_cols 的随机排列
        random_cols = randperm(num_cols);
        % 将前 num_cols_to_zero 列的数据置为 0
        data_train(:, random_cols(1:num_cols_to_zero)) = 0;
    end
    if ~isempty(CDELM_list)
        CDELM_list = [random_indices(CDELM_list(:,1)), random_indices(CDELM_list(:,2))];
        
        for i = 1:size(CDELM_list, 1)
            sample_temp1 = data_train(CDELM_list(i, 1), 2:end);
            sample_temp2 = data_train(CDELM_list(i, 2), 2:end);
            
            CDELM_Weight_temp = sample_temp1 - sample_temp2;
            NormWeight = dot(CDELM_Weight_temp, CDELM_Weight_temp);
            
            if NormWeight >= CDELM_threshold
                CDELM_Weight_temp = CDELM_Weight_temp ./ (NormWeight / 2);
                CDELM_bias_temp = (dot(sample_temp2, sample_temp2) - dot(sample_temp1, sample_temp1)) / NormWeight;
                
                CDELM_Weight = [CDELM_Weight; CDELM_Weight_temp];
                CDELM_bias = [CDELM_bias, CDELM_bias_temp];
            end
        end
    end
end
